package com.woniu.order.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 直接客户订单表
 * @TableName zcx_customer_order
 */
@TableName(value ="zcx_customer_order")
@Data
public class ZcxCustomerOrder implements Serializable {
    /**
     * 订单ID，自增
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号
     */
    private String orderCode;
    /**
     * 申请code
     */
    private String applicationCode;
    /**
     * 付款方式
     */
    private String payment;
    /**
     * 是否免除定金
     */
    private String deposit;

    /**
     * 拆单对应的原本订单编号
     */
    private String originalOrderCode;

    /**
     * 退货款金额
     */
    private BigDecimal returnAmount;

    /**
     * 销售员代码
     */
    private String salespersonCode;

    /**
     * 申请日期
     */
    private String applicationDate;

    /**
     * 客户代码
     */
    private String customerCode;

    /**
     * 客户名称
     */
    private String customerName;

    /**
     * 客户电话
     */
    private String customerPhone;

    /**
     * 销售员姓名
     */
    private String salespersonName;

    /**
     * 定金金额
     */
    private BigDecimal depositAmount;

    /**
     * 订单种类  0 正常 1特价
     */
    private Integer orderType;

    /**
     * 特价折扣，百分比值
     */
    private BigDecimal specialDiscount;

    /**
     * 产品代码
     */
    private String productCode;

    /**
     * 购买产品个数
     */
    private Integer productQuantity;

    /**
     * 计算后订单总价
     */
    private BigDecimal totalPrice;

    /**
     * 申请理由
     */
    private String applicationReason;

    /**
     * 税额
     */
    private BigDecimal taxAmount;

    /**
     * 状态: 0 退款, 1订单申请中, 2修改审批中, 3撤销审批中, 4已撤销, 5已完成, 6已结算
     */
    private Integer status;

    /**
     * 订单显示状态: 0隐藏, 1显示
     */
    private Integer displayStatus;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 修改时间
     */
    private String updateTime;

    /**
     * 修改人
     */
    private String updatePerson;

    /**
     * 创建人
     */
    private String createPerson;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZcxCustomerOrder other = (ZcxCustomerOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderCode() == null ? other.getOrderCode() == null : this.getOrderCode().equals(other.getOrderCode()))
            && (this.getOriginalOrderCode() == null ? other.getOriginalOrderCode() == null : this.getOriginalOrderCode().equals(other.getOriginalOrderCode()))
            && (this.getReturnAmount() == null ? other.getReturnAmount() == null : this.getReturnAmount().equals(other.getReturnAmount()))
            && (this.getSalespersonCode() == null ? other.getSalespersonCode() == null : this.getSalespersonCode().equals(other.getSalespersonCode()))
            && (this.getApplicationDate() == null ? other.getApplicationDate() == null : this.getApplicationDate().equals(other.getApplicationDate()))
            && (this.getCustomerCode() == null ? other.getCustomerCode() == null : this.getCustomerCode().equals(other.getCustomerCode()))
            && (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
            && (this.getCustomerPhone() == null ? other.getCustomerPhone() == null : this.getCustomerPhone().equals(other.getCustomerPhone()))
            && (this.getSalespersonName() == null ? other.getSalespersonName() == null : this.getSalespersonName().equals(other.getSalespersonName()))
            && (this.getDepositAmount() == null ? other.getDepositAmount() == null : this.getDepositAmount().equals(other.getDepositAmount()))
            && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
            && (this.getSpecialDiscount() == null ? other.getSpecialDiscount() == null : this.getSpecialDiscount().equals(other.getSpecialDiscount()))
            && (this.getProductCode() == null ? other.getProductCode() == null : this.getProductCode().equals(other.getProductCode()))
            && (this.getProductQuantity() == null ? other.getProductQuantity() == null : this.getProductQuantity().equals(other.getProductQuantity()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()))
            && (this.getApplicationReason() == null ? other.getApplicationReason() == null : this.getApplicationReason().equals(other.getApplicationReason()))
            && (this.getTaxAmount() == null ? other.getTaxAmount() == null : this.getTaxAmount().equals(other.getTaxAmount()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getDisplayStatus() == null ? other.getDisplayStatus() == null : this.getDisplayStatus().equals(other.getDisplayStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdatePerson() == null ? other.getUpdatePerson() == null : this.getUpdatePerson().equals(other.getUpdatePerson()))
            && (this.getCreatePerson() == null ? other.getCreatePerson() == null : this.getCreatePerson().equals(other.getCreatePerson()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderCode() == null) ? 0 : getOrderCode().hashCode());
        result = prime * result + ((getOriginalOrderCode() == null) ? 0 : getOriginalOrderCode().hashCode());
        result = prime * result + ((getReturnAmount() == null) ? 0 : getReturnAmount().hashCode());
        result = prime * result + ((getSalespersonCode() == null) ? 0 : getSalespersonCode().hashCode());
        result = prime * result + ((getApplicationDate() == null) ? 0 : getApplicationDate().hashCode());
        result = prime * result + ((getCustomerCode() == null) ? 0 : getCustomerCode().hashCode());
        result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
        result = prime * result + ((getCustomerPhone() == null) ? 0 : getCustomerPhone().hashCode());
        result = prime * result + ((getSalespersonName() == null) ? 0 : getSalespersonName().hashCode());
        result = prime * result + ((getDepositAmount() == null) ? 0 : getDepositAmount().hashCode());
        result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
        result = prime * result + ((getSpecialDiscount() == null) ? 0 : getSpecialDiscount().hashCode());
        result = prime * result + ((getProductCode() == null) ? 0 : getProductCode().hashCode());
        result = prime * result + ((getProductQuantity() == null) ? 0 : getProductQuantity().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        result = prime * result + ((getApplicationReason() == null) ? 0 : getApplicationReason().hashCode());
        result = prime * result + ((getTaxAmount() == null) ? 0 : getTaxAmount().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getDisplayStatus() == null) ? 0 : getDisplayStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdatePerson() == null) ? 0 : getUpdatePerson().hashCode());
        result = prime * result + ((getCreatePerson() == null) ? 0 : getCreatePerson().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderCode=").append(orderCode);
        sb.append(", originalOrderCode=").append(originalOrderCode);
        sb.append(", returnAmount=").append(returnAmount);
        sb.append(", salespersonCode=").append(salespersonCode);
        sb.append(", applicationDate=").append(applicationDate);
        sb.append(", customerCode=").append(customerCode);
        sb.append(", customerName=").append(customerName);
        sb.append(", customerPhone=").append(customerPhone);
        sb.append(", salespersonName=").append(salespersonName);
        sb.append(", depositAmount=").append(depositAmount);
        sb.append(", orderType=").append(orderType);
        sb.append(", specialDiscount=").append(specialDiscount);
        sb.append(", productCode=").append(productCode);
        sb.append(", productQuantity=").append(productQuantity);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", applicationReason=").append(applicationReason);
        sb.append(", taxAmount=").append(taxAmount);
        sb.append(", status=").append(status);
        sb.append(", displayStatus=").append(displayStatus);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updatePerson=").append(updatePerson);
        sb.append(", createPerson=").append(createPerson);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}